package com.fc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 后台用户日志表
 * </p>
 *
 * @author 张非
 * @since 2023-07-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysLog对象", description="后台用户日志表")
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Excel(name = "id", width = 15)
    private String id;

    @ApiModelProperty(value = "日志类型")
    @Excel(name = "日志类型", width = 15)
    private Integer logType;

    @ApiModelProperty(value = "日志内容")
    @Excel(name = "日志内容", width = 15)
    private String logContent;

    @ApiModelProperty(value = "操作类型")
    @Excel(name = "操作类型", width = 15)
    private Integer operateType;

    @ApiModelProperty(value = "用户账户")
    @Excel(name = "用户账户", width = 15)
    private String username;

    @ApiModelProperty(value = "用户真实姓名")
    @Excel(name = "用户真实姓名", width = 15)
    private String realname;

    @ApiModelProperty(value = "ip地址")
    @Excel(name = "ip地址", width = 15)
    private String ip;

    @ApiModelProperty(value = "请求方法")
    @Excel(name = "请求方法", width = 15)
    private String method;

    @ApiModelProperty(value = "请求路径")
    @Excel(name = "请求路径", width = 15)
    private String requestUrl;

    @ApiModelProperty(value = "请求参数")
    @Excel(name = "请求参数", width = 15)
    private String requestParam;

    @ApiModelProperty(value = "请求类型")
    @Excel(name = "请求类型", width = 15)
    private String requestType;

    @ApiModelProperty(value = "花费时间")
    @Excel(name = "花费时间", width = 15)
    private Long costTime;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


}
